package cn.lanqiao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import cn.lanqiao.entity.Fill_error;

@Mapper
public interface Fill_errorMapper {
 //根据学生id展示错题
	 @Select("select * from fill_error where studentId = #{studentId}")
	public List<Fill_error> findById(Integer studentId);
//根据题目id删除错题
	@Delete("delete from fill_error where questionId = #{questionId}")
    public int deleteById(Integer questionId);
	//添加
	@Insert("insert into fill_error(questionId,subject,question,analysis,answer,studentId,errorAnswer) values(#{questionId},#{subject},#{question},#{analysis},#{answer},#{studentId},#{errorAnswer})")
    public int add(Fill_error fill);
}
